/*
 * Powered By XY
 * Since 2020
 */

package com.xy.biz.base.dao;

import com.xy.biz.base.domain.po.EquipmentPO;
import com.xy.biz.base.domain.query.EquipmentQuery;

import java.util.Collection;
import java.util.List;

/**
 *
 *
 * @author yzh
 * @date 2021-4-13
 */
public interface EquipmentDao {

    /**
     * 保存
     *
     * @param equipmentPO
     */
    int saveEquipment(EquipmentPO equipmentPO);

    /**
     * 保存多个
     *
     * @param collection
     */
    int saveAllEquipment(Collection<EquipmentPO> collection);

    /**
     * 更新
     *
     * @param equipmentPO
     */
    int updateEquipment(EquipmentPO equipmentPO);

    /**
     * 删除
     *
     * @param equipmentId
     */
    int deleteEquipment(Long equipmentId);

    /**
     * 查找一个
     *
     * @param equipmentId
     * @return
     */
    EquipmentPO getEquipment(Long equipmentId);

    /**
     * 查找多条
     *
     * @param collection
     * @return
     */
    List<EquipmentPO> listEquipmentById(Collection<Long> collection);

    /**
     * 条件查找多条
     *
     * @param query 查找条件
     * @return
     */
    List<EquipmentPO> listEquipment(EquipmentQuery query);

    /**
     * 条件统计个数
     *
     * @param query 查找条件
     * @return
     */
    int countEquipment(EquipmentQuery query);

    /**
     * 上锁
     */
    int lockup(Collection<Long> collection);

    /**
     * 解锁
     */
    int unlock(Collection<Long> collection);

}
